<!-- 教务页面 -->
 <!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>-导航管理</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="/favicon.ico">
    <link href="/static/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/static/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="/static/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/static/admin/css/animate.css" rel="stylesheet">
    <link href="/static/admin/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="/static/admin/css/plugins/switchery/switchery.css" rel="stylesheet">
	<style>
	  .tools a i{
	    color:#19a9d5
	  }
	  .tools a i:hover{
	    text-shadow:0px 0px 5px #19a9d5;
	  }
	</style>

</head>

<body class="gray-bg">
    <div class="row wrapper border-bottom white-bg page-heading">
        <div class="col-sm-4">
            <h2>教务列表</h2>
            <ol class="breadcrumb">
                <li>
                    <a href="{:url('Index/admin')}">主页</a>
                </li>
                <li>
                    <strong>教务管理</strong>
                    <div class="input-group">
                    <form action="{:url('Teachingteam/educationaladministration')}" method="post">
                                    <input type="text" placeholder="搜索" name="search"  class="form-control input-lg">
                                    <div class="input-group-btn" style="margin-top: -30px; float: right;">
                                        <button class="btn btn-primary" type="submit">
                                            搜索
                                        </button>
                                    </div>
                                    </form>
                                </div>
                </li>
            </ol>
        </div>
    </div>

    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>教务管理</h5>
                        
                    </div>
                    <div class="ibox-content">
                        <div class="row">
                            <div class="col-sm-3">
                                <div class="input-group">
                                  
                                </div>
                            </div>
                        </div>
                        <div class="table-responsive">
                            <table class="table table-striped">
                                <tr>
                                    <th>id</th>
                                    <th>教务姓名</th>
                                    <th>教务年龄</th>
                                    <th>性别</th>
                                    <th>地址</th>
                                    <th>身份证号</th>

                                    <th>电话</th>
                                    <th>在职状态</th>


                                    <th>邮箱</th>
                                    <th>创建时间</th>
                                    <th>职务状态</th>


                                </tr>
                                </thead>
                                <tbody>
                                {foreach  name="res" item="vo"}
                                <tr>
                                    <td>{$vo.id}</td>
                                    <td>{$vo.username}</td>
                                    <td>{$vo.age}</td>
                                    <td>{if condition="$vo.sex eq 1"}女{else/}男{/if}</td>
                                    <td>{$vo.map}</td>
                                    <td>{$vo.cardid}</td>
                                    <td>{$vo.phone}</td>
                                    <td>{if condition="$vo.poststatus eq 1"}在职{elseif condition="$vo.poststatus eq 2"}离职{else/}停职{/if}</td>

                                    <td>{$vo.email}</td>
                                    <td>{$vo.create_time}</td>

                                    <td>{if condition='$vo.posttype eq 1'}<b style="color:red;">全职</b>{else/}<b style="color:yellow;">兼职</b>{/if}</td>


                                </tr>
                                {/foreach}

                            </table>
                        </div>

                    </div>
                </div>
            </div>

        </div>
    </div>

    <!-- 全局js -->
    <script src="/static/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/static/admin/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- Peity -->
    <script src="/static/admin/js/plugins/peity/jquery.peity.min.js"></script>
    <!-- Switchery -->
    <script src="/static/admin/js/plugins/switchery/switchery.js"></script>
    <script src="/static/admin/layui/layui.js"></script>
    <script>
        layui.use('layer', function(){ //独立版的layer无需执行这一句
            var $ = layui.jquery, layer = layui.layer; //独立版的layer无需执行这一句
            //点击提交
            $(".del").click(function(){
                var s = $(this);
                var ids=$(this).parents(".pa").find(".sids").html();
                // alert(ids);
                var que= window.confirm("确定要删除吗");
                $.post("{:url('Student/delete')}",{id:ids},function(msg){
                         
                         if (msg==1) {
                            alert("删除成功");
                            s.parents("tr").remove();
                         }else{
                            alert("删除失败");
                         }
                })

            

            });

        });
        //状态的切换按钮的初始化样式
        var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch'));
        elems.forEach(function(html) {
            var switchery = new Switchery(html,{ size: 'small' });
        });
        //修改状态
        $(".js-switch").change(function(){
            var checkedS = $(this).is(":checked");
            var ids = $(this).attr("data-id");
            var st = "";
            var str = "";
            if(checkedS){
                st = 1;
                str = "显示";
            }else{
                st = 2;
                str = "隐藏";
            }
            $.post("{:url('Menus/setStatus')}",{id:ids,status:st},function(data){

                layer.msg(str+data.msg,{time:2000});
            });
        });
    </script>
</body>
</html>
